﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SectionPlane.aspx.cs" Inherits="GroundWater.Basedata.SectionPlane" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <script language="javascript" src="../js/jquery.js" type="text/javascript"></script>
    <script language="javascript" src="../js/common.js" type="text/javascript"></script>
    <link media="all" href="../js/resources/_Common/Common.css" type=text/css rel=stylesheet />
<link media="all" href="../js/resources/_Loadding/Loadding.css" type=text/css rel=stylesheet />
<link media="all" href="../js/resources/_Panel/Panel.css" type=text/css rel=stylesheet />
<link media="all" href="../js/resources/_Button/Button.css" type=text/css rel=stylesheet />
<link media="all" href="../js/resources/_TextBox/TextBox.css" type=text/css rel=stylesheet />

</head>
<body>
    <form id="form1" runat="server"><asp:ScriptManager ID="sm" runat="server" />
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="GetAll" TypeName="GroundWater.BusinessActions.SectionPlane" DeleteMethod="Delete" ondeleting="ods_Deleting"> <%--  --%>
    <SelectParameters>
        <asp:Parameter Name="isStoredProc" Type="Boolean" DefaultValue="False" />
        <asp:Parameter Name="enableCache" Type="Boolean" DefaultValue="False" />
    </SelectParameters>
    <DeleteParameters>
        <asp:Parameter Name="isStoredProc" Type="Boolean" DefaultValue="False" />
        <asp:Parameter Name="logical" Type="Boolean" DefaultValue="False" />
    </DeleteParameters>
</asp:ObjectDataSource>
    
    <div style="width:100%;">
        <p style="font-weight:bold; font-family:Tahoma; margin-bottom:10px; "></p>
        <div class="grid">
            <div class="rounded">
                <div class="top-outer"><div class="top-inner"><div class="top">
                    <h2>剖面信息维护</h2>
                </div></div></div>
                <div class="mid-outer"><div class="mid-inner"><div class="mid">     
                
                    <!-- Content Goes Here! -->
                    <asp:UpdatePanel ID="updPanel" runat="server" UpdateMode="Conditional">
                        <ContentTemplate>
                            <asp:GridView  ID="gv" runat="server" DataSourceID="ods" OnRowDataBound="RowDataBound" SkinID="DefaultGridView" DataKeyNames="Id">
                                <Columns>
                                    <asp:BoundField  HeaderText="剖面代码" DataField="Code" SortExpression="Code" HeaderStyle-CssClass="first" ItemStyle-CssClass="first" />
                                    <asp:BoundField  HeaderText="剖面名称" DataField="Name"   SortExpression="Name" />
                                    <asp:BoundField  HeaderText="剖面说明" DataField="Description"   SortExpression="Description" />
                                    
                                    <%--<asp:BoundField  HeaderText="备注" DataField="Description"     SortExpression="Description" DataFormatString="{0:c}"   ItemStyle-CssClass="money"  />--%>
                                    <asp:TemplateField><ItemTemplate><asp:LinkButton id="btnEdit" runat="server" CommandName="Select" OnClick="btnEdit_Click">编辑</asp:LinkButton></ItemTemplate></asp:TemplateField>
                                    <asp:CommandField ShowDeleteButton="true" DeleteText="删除" />
                                </Columns>
                            </asp:GridView>
                        </ContentTemplate>
                    </asp:UpdatePanel>                     
    
                </div></div></div>
            <div class="bottom-outer"><div class="bottom-inner">
            <div class="bottom"></div></div></div>                   
        </div>      
        </div>
    </div>
    
    <!-- 面板内容 -->                
<div id="bodyPanel">

<asp:Panel ID="PopupPanel" runat="server" CssClass="x-pne" style="display:none; z-index:9999;  width:500px;">

<asp:UpdatePanel ID="updPnl" runat="server" UpdateMode="Conditional">
<ContentTemplate>

<asp:Button id="btnShowPopupHelper" runat="server" style="display:none" />
    <ajaxToolKit:ModalPopupExtender ID="mdlPopup" runat="server" 
    BehaviorID="popupBehavior" 
    TargetControlID="btnShowPopupHelper" 
    PopupControlID="PopupPanel" 
    DropShadow="false"
    PopupDragHandleControlID="DragPanel"
    BackgroundCssClass="modalBackground"
    CancelControlID="btnClose" />

    <asp:Panel ID="DragPanel" runat="server" CssClass="corner-bg x-pne-lt x-pne-left">
    <div class="corner-bg x-pne-rt x-pne-right">
    <div class="corner-bg x-pne-t drag">
    <div class=x-pne-btn style="background-position: 0px 0px" onclick="$find('popupBehavior').hide();" ></div>
    <div class="x-pne-caption font drag">编辑剖面信息</div>
    </div>
    </div>
    </asp:Panel>
    
    <div>
    <div class="side-bg x-pne-l">
    <div class="side-bg x-pne-r">
    <div class="x-pne-c" style="WIDTH: 488px; HEIGHT: 140px">
    <div id="contentPanel"><!-- 控件实例 -->

    <div class="gbPanel">
<table id="tblWell" class="font" style="width: 100%;">
    <tr>
        <td>剖面代码</td><td><asp:TextBox runat="server" CssClass="textField text-bg border-blur" id="txtCode" type="text"  /><span class="warning">*</span></td>
        <td>剖面名称</td><td><asp:TextBox runat="server" CssClass="textField text-bg border-blur" id="txtName" type="text"  /><span class="warning">*</span></td>
    </tr>
    <tr>
        <td>剖面说明</td><td colspan="3"><asp:TextBox runat="server" CssClass="textField text-bg border-blur" id="txtDescription"   Width="90%"  /></td>
    </tr>
</table>
    </div>

    <div class="gbPanel" style="margin-top:20px; text-align:center;">
    <table class="method-area1" style="margin:0 auto; text-align:left;">
    <tbody>
    <tr>
    <td style="padding-left:30px;">
        <div>
            <div class="btn-side btn-bg" style="background-position: 0% 0%"></div>
            <div class="btn-body btn-bg" style="background-position: 0px 168px; WIDTH: 60px"><asp:Button ID="btnOK" runat="server" Text="保  存" CssClass="font" OnClick="btnOK_Click" OnClientClick="return validateWell();" /></div><%----%>
            <div class="btn-side btn-bg" style="background-position: 0px 189px"></div>
        </div>
    </td>
    <td style="padding-left:30px;">
        <div>
            <div class="btn-side btn-bg" style="background-position: 0% 0%"></div>
            <div class="btn-body btn-bg" style="background-position: 0px 168px; WIDTH: 60px"><asp:Button ID="btnClose" runat="server" Text="取  消" CssClass="font" /></div>
            <div class="btn-side btn-bg" style="background-position: 0px 189px"></div>
        </div>
    </td>
    </tr>

    </tbody>
    </table>
    </div>


    </div>
    </div>
    </div>
    </div>
    
    <div class="corner-bg x-pne-lb x-pne-left">
        <div class="corner-bg x-pne-rb x-pne-right">
            <div class="corner-bg x-pne-b"></div>
        </div>
    </div>
    </div>
    
     </ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnAdd" />
</Triggers>
 </asp:UpdatePanel>
</asp:Panel>

</div>
<!-- 面板内容结束 -->
    
<div style="margin-left:36px; margin-top:10px;"><asp:Button ID="btnAdd" runat="server" Text="添加剖面" CssClass="BigButton" OnClick="btnAdd_Click" /></div>
  
  
<asp:updateprogress id="updateProgress" runat="server" DynamicLayout="true" DisplayAfter="200">
    <progresstemplate>
        <div id="progressBackgroundFilter"></div>
        <div id="processMessage">正在处理数据，请稍等...<br /><br /><img alt="Loading" src="../images/loading_16.gif" /></div>
    </progresstemplate>
</asp:updateprogress>
    
<script type="text/javascript">
    //<![CDATA[
    function validateWell() {

        var message = "";
        if (!notEmpty($get("txtCode"))) {
            message += "剖面代码不能为空。\n";
        }
        if (!notEmpty($get("txtName"))) {
            message += "剖面名称不能为空。\n";
        }

        if (message.length > 0) {
            alert(message);
            return false;
        }
        return true;
    }

    var prm = Sys.WebForms.PageRequestManager.getInstance();
    prm.add_pageLoading(pageLoadingHandler);
    function pageLoadingHandler(sender, args) {
        var dataItems = args.get_dataItems();
        if (dataItems['txtName'] && dataItems['txtName'] === "1") {

            alert("已存在名称为" + $get("txtCode").value + " 的剖面。");
        }
    }
    //]]>
</script>
<asp:Literal ID="lblJavaScript" EnableViewState="false" runat="server"></asp:Literal>
    </form>
</body>
</html>
